package com.ddllh.irontomato;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ToDoTodayActivity extends Activity {
	
	private ListView listView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tdtoday);
		
		listView=(ListView)findViewById(R.id.List2);
        listView.setAdapter(new ArrayAdapter<String>(this,
        		android.R.layout.simple_list_item_1,
        		new String[]{"Item1","Item2"}));
	}
	
	public void Edit(Task task) {
		DbHelper.getInstance().UpdateItem(DbHelper.TABLE_TASK, task);
	} 
	
    public void Delete(Task task){
    	DbHelper.getInstance().DeleteItem(DbHelper.TABLE_TASK, task);
    }
    
    public void MoveInventory(Task task) {
		task.mColumeValue[task.mColumeValue.length - 1] = "0";
		DbHelper.getInstance().UpdateItem(DbHelper.TABLE_TASK, task);
	}

}
